<?php
define('DB_NAME', 'oversea_cslibary');

define('DB_USER', 'oversea_Protect');

define('DB_PASSWORD', 'Oversea1');

define('DB_HOST', 'mysql3.quadrahosting.com');
/*直接copy您wordpress数据库设置部分即可*/

$mysql = mysql_connect(DB_HOST,DB_USER,DB_PASSWORD) or die("mysql connect fail, wrong password");

mysql_select_db(DB_NAME)or die("select DB fail");

mysql_query("set names utf8");

$fp = fopen("db.sql","r") or die('can not open file');

while( $s = fgets( $fp,100000 ) ){
	$m .= $s;
}

$sql_content = explode(";\n",$m);

$i = 0;

$max = count($sql_content) ;

while( $i < $max ){
	mysql_query( $sql_content [$i] );
	
	if( mysql_error()) echo mysql_error()."<br />";
	
	else{
	
		$n ++;
	}
	$i ++;
}
echo "<br />mysql queries:".$n;

fclose($fp);
?>
